/**
 * @author:林南方
 * @create 2025-10-18-16:28
 * 年月
 */

public class YearMonth {
    private int Year;
    private int Month;

    public YearMonth(int year, int month){
        Year=year;
        Month=month;
    }

    public YearMonth(String yearMonth) {
        this(
            Integer.parseInt(yearMonth.substring(0,4)),
            Integer.parseInt(yearMonth.substring(4,6))
        );
    }

    public int getYear(){
        return Year;
    }

    public int getMonth() {
        return Month;
    }
}
